<template>

    <div class="header top">
        <div class="logo" v-if="menulistconfig">
            <i class="img"><img src="../assets/images/logo_a.svg" class="white"><img :src="this.$store.state.domain+menulistconfig[1].img" class="color"></i><span class="t">{{menulistconfig[0].name}}</span>
        </div>
        <!--最上角中英文切换-->
        <div class="menu_btn">
            <a href="#" v-if="gshow" class="roll-hover-btn cn"><span class="s">中文</span><span class="x">中文</span></a>
            <em v-if="gshow">/</em>
            <a href="#" v-if="gshow" class="roll-hover-btn zn"><span class="s">EN</span><span class="x">EN</span></a>
            <i class="roll-hover-btn dh openContact"><span class="s"></span><span class="x"></span></i>
        </div>
    </div>

</template>

<style lang="scss">
</style>

<script>
export default {
    name: 'Header',
    components: {
    },
    data () {
        return {
            gshow:false,
        };
    },
    computed: {
        menulistconfig() {
            return this.$store.getters.getmenuconfig
        }
    },
    methods: {
    },
    mounted () {
        $(window).scroll(function () {

            if ($(window).scrollTop()>$('.second_show,.third_show').height()-100) {
                $('.header').addClass('not_top')
                $('.switchnav').addClass('web')
            }else{
                $('.header').removeClass('not_top')
                $('.switchnav').removeClass('web')
            }

            if ($(window).scrollTop()>107) {
                //$('.header').addClass('not_top')
                $('.switchnav').addClass('not_top')
            }else{
                //$('.header').removeClass('not_top')
                $('.switchnav').removeClass('not_top')
            }
        })
    }
}
</script>
